{{define "title"}}选题列表 - Go中文翻译组(GCTT) {{end}}
{{define "content"}}
<div class="row">
    <div class="col-md-9 col-sm-6">
        <div class="sep20"></div>
        <ol class="breadcrumb">
            <li><a href="/">首页</a></li>
            <li><a href="/gctt">GCTT</a></li>
            <li class="active">选题列表</li>
        </ol>
        <div class="page box_white">
            <form action="/gctt-issue" style="margin: 20px 0;overflow: hidden;">
                <div>
                    <div class="col-xs-2">
                    </div>
                    <div class="col-xs-6">
                        <input type="text" class="form-control" name="translator" placeholder="输入译者 GitHub ID" value="{{.translator}}" />
                    </div>
                    <div class="col-xs-1">
                        <button type="submit" class="btn btn-default">搜索</button>
                    </div>
                </div>
            </form>
            <ul class="trigger-menu" data-pjax-container="#list-container">
                <li class='{{if eq .label ""}}active{{end}}'>
                    <a href="/gctt-issue"> 全部</a>
                </li>
                <li class='{{if eq .label "待认领"}}active{{end}}'>
                    <a href="/gctt-issue?label=待认领"> 待认领{{if eq .label "待认领"}}({{.total}}){{end}}</a>
                </li>
                <li class='{{if eq .label "已认领"}}active{{end}}'>
                    <a href="/gctt-issue?label=已认领"> 翻译中{{if eq .label "已认领"}}({{.total}}){{end}}</a>
                </li>
            </ul>
            <div class="table-responsive">
                <table class="table table-striped table-bordered">
                    <thead>
                        <tr>
                            <th>Issue ID</th>
                            <th>标题</th>
                            <th>译者</th>
                            <th>认领时间</th>
                            <th>完成时间</th>
                            <th>Label</th>
                            <th>状态</th>
                            <th>认领</th>
                        </tr>
                    </thead>
                    <tbody>
                        {{range .issues}}
                        <tr>
                            <td><a href="https://github.com/studygolang/GCTT/issues/{{.Id}}" target="_blank">{{.Id}}</a></td>
                            <td>
                                <a href="https://github.com/studygolang/GCTT/issues/{{.Id}}" target="_blank">
                                    {{.Title}}
                                </a>
                            </td>
                            <td style="white-space: nowrap;"><a href="/gctt/{{.Translator}}">{{.Translator}}</a></td>
                            <td style="white-space: nowrap;">
                            {{if gt .TranslatingAt 0}}
                                {{format .TranslatingAt "2006-01-02"}}
                            {{end}}
                            </td>
                            <td style="white-space: nowrap;">
                            {{if gt .TranslatedAt 0}}
                                {{format .TranslatedAt "2006-01-02"}}
                            {{end}}
                            </td>
                            <td {{if eq .Label "待认领"}}style="color:red;white-space: nowrap;"{{end}}>{{.Label}}</td>
                            <td>{{if eq .State 0}}open{{else}}closed{{end}}</td>
                            <td>{{if eq .Label "待认领"}}<a href="https://github.com/studygolang/GCTT/issues/{{.Id}}" target="_blank" class="btn btn-default btn-sm">去认领</a>{{end}}</td>
                        </tr>
                        {{end}}
                    </tbody>
                </table>
                {{if $.page}}
                    <div class="box_white">
                        <div class="inner_content">
                            <nav class="text-center"><ul class="pagination pagination-sm" style="margin: 1px 0;">{{$.page}}</ul></nav>
                        </div>
                    </div>
                {{end}}
            </div>
        </div>
    </div>
    <div class="col-md-3 col-sm-6">
        <div class="sep20"></div>

        <div class="box_white sidebar">
            <div class="top">
                <h3 class="title"><i class="glyphicon glyphicon-list"></i>&nbsp;最新翻译成果</h3>
            </div>
            <div class="sb-content">
                <div class="article-list">
                    <ul class="list-unstyled" style="margin:10px;">
                    {{range .prs}}
                        <li>
                            <a href="https://github.com/studygolang/GCTT/pull/{{.PR}}" target="_blank" data-tooltip="{{.Title}}" style="font-size: 1.25rem;">{{.Title}}</a>
                        </li>
                    {{end}}
                    </ul>
                </div>
            </div>
        </div>

    </div>
</div>
{{end}}

{{define "css"}}
<link href="https://cdn.bootcss.com/html5tooltipsjs/1.7.2/html5tooltips.min.css" rel="stylesheet">
{{end}}

{{define "js"}}
<script src="https://cdn.bootcss.com/html5tooltipsjs/1.7.2/html5tooltips.min.js"></script>
{{end}}